package com.CST.vo.ys;

import com.CST.bo.YsSubjectTypeBO;
import com.CST.entity.ys.YsDepartment;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.converters.localdatetime.LocalDateTimeDateConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class YsSubjectVO {

    private Integer id;

    @ExcelProperty("预算科目名称")
    @ApiModelProperty("预算科目名称")
    private String subjectName;

    @ExcelProperty("预算科目编码")
    @ApiModelProperty("预算科目编码")
    private String subjectCode;

    @ExcelProperty("预算类别")
    @ApiModelProperty("预算类别")
    private String subjectType;

    @ExcelProperty("预算类别编码")
    @ApiModelProperty("预算类别编码")
    private String subjectTypeName;

    @ExcelProperty("类型")
    @ApiModelProperty("类型")
    private String type;

    @ExcelIgnore
    private List<Long> typeIds;

    @ExcelProperty("部门名称")
    @ApiModelProperty("部门名称")
    private String departmentNames;

    @ExcelProperty("部门编码")
    @ApiModelProperty("部门编码")
    private String departmentCodes;

    @ExcelIgnore
    @ApiModelProperty("部门ids")
    private List<Long> deptIds;

    @ExcelProperty("备注")
    @ApiModelProperty("备注")
    private String remark;

    @ExcelProperty(value = "创建时间",converter = LocalDateTimeDateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ExcelProperty("父预算科目名称")
    @ApiModelProperty("父预算科目名称")
    private String parentName;

    @ExcelProperty("父id")
    @ApiModelProperty("父id")
    private Integer parent;

    @ExcelProperty("顶级id")
    @ApiModelProperty("顶级id")
    private Integer firstId;

    @ExcelProperty("父true或子false")
    @ApiModelProperty("父true或子false")
    private Boolean parentChild;

    @ExcelProperty("是否为末级节点")
    @ApiModelProperty("是否为末级节点")
    private Boolean child;

    @JsonIgnore
    @ExcelIgnore
    private List<YsSubjectTypeBO> types;

    @JsonIgnore
    @ExcelIgnore
    private List<YsDepartment> departments;

    @ExcelIgnore
    private List<YsSubjectVO> childList;
}
